//
//  Globalize.h
//  ICE_Player
//
//  Created by  on 11-10-19.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "../UI/ICE_View_Interface.h"

typedef enum{
    EG_LANGUAGE_NONE = 0,
    EG_LANGUAGE_ENGLISH,
    EG_LANGUAGE_CHINESE,
    EG_LANGUAGE_JAPANESE,
    EG_LANGUAGE_FRENCH,
    EG_LANGUAGE_KOREAN,
    EG_LANGUAGE_GERMAN,
    EG_LANGUAGE_COUNT,
}E_GLOBALIZE_LANGUAGE;

typedef enum{
    EG_LBL_ID_NONE = 0,
    //Config
    EG_LBL_ID_CFG_CONFIG,
    EG_LBL_ID_CFG_ROTATION,
    EG_LBL_ID_CFG_SUBTITLE,
    EG_LBL_ID_CFG_TEXT_INFO,
    EG_LBL_ID_CFG_LOOP_MODE,
    EG_LBL_ID_CFG_LOOP_MODE_STATE,
    EG_LBL_ID_CFG_PRESS_ME,
    EG_LBL_ID_CFG_WEB,
    EG_LBL_ID_CFG_EMAIL,
    //List and Cell
    EG_LBL_ID_LIST_CELL_PLAY,
    //MessageBox
    EG_LBL_ID_MB_OK,
    EG_LBL_ID_MB_CANCEL,
    //BG View
    EG_LBL_ID_BG_CONFIG_BTN,
    EG_LBL_ID_BG_WIFI_BTN,
    EG_LBL_ID_BG_ROTATION_BTN,
    //Player
    EG_LBL_ID_PLAYER_RET_BTN,
    EG_LBL_ID_PLAYER_LOOP_MODE,
    EG_LBL_ID_PLAYER_SCREEN_MODE,
    EG_LBL_ID_PLAYER_PLAY_BTN,
    EG_LBL_ID_PLAYER_FINGER_DRAG,
    //Low Wnd
    EG_LBL_ID_LOW_WND_SIZE,
    EG_LBL_ID_LOW_WND_DURATION,
    ///////
    EG_LBL_ID_COUNT,
} E_GLOBALIZE_LABLE_ID;

typedef enum{
    EG_STR_ID_NONE = 0,
    
    //Config
    EG_STR_ID_CFG_CONFIG,
    EG_STR_ID_CFG_ROTATION,
    EG_STR_ID_CFG_SUBTITLE,
    EG_STR_ID_CFG_TEXT_INFO,
    EG_STR_ID_CFG_LOOP_MODE,
    EG_STR_ID_CFG_PRESS_ME,
    EG_STR_ID_CFG_WEB,
    EG_STR_ID_CFG_EMAIL,
    //List and Cell
    EG_STR_ID_LIST_CELL_PLAY,
    //MessageBox
    EG_STR_ID_MB_OK,
    EG_STR_ID_MB_CANCEL,
    EG_STR_ID_MB_YES,
    EG_STR_ID_MB_NO,
    EG_STR_ID_MB_WIFI_TITLE,
    EG_STR_ID_MB_DELETE_TITLE,
    EG_STR_ID_MB_FILE_ERROR_TITLE,
    EG_STR_ID_MB_REACH_EDGE,
    //BG View
    EG_STR_ID_BG_CONFIG_BTN,
    EG_STR_ID_BG_WIFI_BTN,
    EG_STR_ID_BG_LOCK_BTN,
    //Pass Words
    EG_STR_ID_PSW_SET,
    EG_STR_ID_PSW_INPUT,
    EG_STR_ID_PSW_WRONG,
    EG_STR_ID_PSW_CONFIRM,
    EG_STR_ID_PSW_RESET_PSW,
    EG_STR_ID_PSW_NEW_PSW_IS,
    //Player View
    EG_STR_ID_PLAYER_RET_BTN,
    EG_STR_ID_PLAYER_SCREEN_MODE,
    EG_STR_ID_PLAYER_PLAY,
    EG_STR_ID_PLAYER_PAUSE,
    EG_STR_ID_PLAYER_FINGER_DRAG,
    //Low Wnd
    EG_STR_ID_LOW_WND_SIZE,
    EG_STR_ID_LOW_WND_DURATION,
    //Loop Mode
    EG_STR_ID_LOOP_MODE_NO_LOOP,
    EG_STR_ID_LOOP_MODE_SINGLE_LOOP,
    EG_STR_ID_LOOP_MODE_LIST_LOOP,
    EG_STR_ID_LOOP_MODE_RANDOM,
    
    //Empty String
    EG_STR_ID_EMPTY,
    ////////
    EG_STR_ID_COUNT,
} E_GLOBALIZE_STRING_ID;

typedef enum{
    EG_IMG_ID_NONE = 0,
    EG_IMG_ID_COUNT,
} E_GLOBALIZE_UIIMAGE_ID;

NSString* globalize_string_by_id(E_GLOBALIZE_STRING_ID str_id);
#define IGS globalize_string_by_id

@interface Globalize : NSObject{
    ICE_Label_View** p_label_arrays;
    ICE_String** p_string_arrays;
    ICE_Image_View** p_image_arrays;
    BOOL hidden_labels;
}

@property BOOL hidden_labels;

+ (id)current_global;
- (ICE_Label_View*)localize_label:(ICE_Label_View*)label with_language:(E_GLOBALIZE_LANGUAGE)language of_id:(E_GLOBALIZE_LABLE_ID)obj_id;
- (ICE_String*)localize_string:(ICE_String*)string with_language:(E_GLOBALIZE_LANGUAGE)language of_id:(E_GLOBALIZE_STRING_ID)obj_id;
- (ICE_Image_View*)localize_image:(ICE_Image_View*)image_view with_language:(E_GLOBALIZE_LANGUAGE)language of_id:(E_GLOBALIZE_STRING_ID)obj_id;
- (ICE_Label_View*)localize_label_by_current_language:(ICE_Label_View*)label of_id:(E_GLOBALIZE_LABLE_ID)obj_id;
- (ICE_String*)localize_string_by_current_language:(ICE_String*)string of_id:(E_GLOBALIZE_STRING_ID)obj_id;
- (ICE_Image_View*)localize_image_by_current_language:(ICE_Image_View*)image_view of_id:(E_GLOBALIZE_STRING_ID)obj_id;
- (void)localize_all_label;
- (void)localize_all_string;
- (void)localize_all_image;

@end
